<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
	<script type="text/javascript">
		var index=1;
		var result=1;
		
		function dg(end){
			if(end==1){
				return 1;
			}else{
				return end*dg(end-1);
			}
		}
		
		console.log(dg(5));
	</script>
		
	</body>
</html>
